{include file="header_zeepin.html"}
<script type="text/javascript">
//注册表单验证
$(function(){
    $('#register_form').validate({
    	
        errorPlacement: function(error, element){
            var error_td = element.parent('div').next('div');
            error_td.find('.field_notice').hide();
            error_td.append(error);
            element.parent('div').addClass("minbox_hd_error").removeClass("minbox_hd");
        },
        success : function(label){
            label.addClass('validate_right').text('OK!');
            label.parent('div').prev('div').addClass("minbox_hd").removeClass("minbox_hd_error");
            if(label.attr("for")=="password_confirm"&&label.html()=="OK!"){
            	var submit_button = "<input type='image' src='{res file=images}/finish_ov.gif' />";
            	$("#register_right").children(".right_bg").html(submit_button);
            }
        },
        onkeyup: false,
        rules : {
            user_name : {
                required : true,
                byteRange: [3,15,'{$charset}'],
                remote   : {
                    url :'index.php?app=member&act=check_user&ajax=1',
                    type:'get',
                    data:{
                        user_name : function(){
                            return $('#user_name').val();
                        }
                    },
                    beforeSend:function(){
                        var _checking = $('#checking_user');
                        _checking.prev('.field_notice').hide();
                        _checking.next('label').hide();
                        $(_checking).show();
                    },
                    complete :function(){
                        $('#checking_user').hide();
                    }
                }
            },
            password : {
                required : true,
                minlength: 6
            },
            password_confirm : {
                required : true,
                equalTo  : '#password'
            },
            email : {
                required : true,
                email    : true
            },
            captcha : {
                required : true,
                remote   : {
                    url : 'index.php?app=captcha&act=check_captcha',
                    type: 'get',
                    data:{
                        captcha : function(){
                            return $('#captcha1').val();
                        }
                    }
                }
            },
            agree : {
                required : true
            }
        },
        messages : {
            user_name : {
                required : '{$lang.user_name_required}',
                byteRange: '{$lang.user_name_limit}',
                remote   : '{$lang.user_already_taken}'
            },
            password  : {
                required : '{$lang.password_required}',
                minlength: '{$lang.password_length_limit}'
            },
            password_confirm : {
                required : '{$lang.password_confirm_please}',
                equalTo  : '{$lang.password_inconsistent}'
            },
            email : {
                required : '{$lang.email_required}',
                email    : '{$lang.email_invalid}'
            },
            captcha : {
                required : '{$lang.captcha_required}',
                remote   : '{$lang.captcha_error}'
            },
            agree : {
                required : '{$lang.agree_required}'
            }
        },
    });
});
</script>
<div class="container">
  <div class="span12 register">
  <form name="" id="register_form" method="post" action="">
      <div class="left space">
      
           <div class="span3 minbox">
                    <div class="minbox_hd">{$lang.user_name}:
                      <input type="text" id="user_name" name="user_name" />
                    </div>  
                    <div class="minbox_bd"><label class="field_notice">{$lang.can_not_edit}</label><label id="checking_user" class="checking">{$lang.checking}</label>
                    </div>
           </div>   
            
              <div class="span3 minbox">
                    <div class="minbox_hd"><a href="#" class="question"></a>{$lang.email}:
                      <input type="text" name="email" />
                    </div> 
                     <div class="minbox_bd"><label class="field_notice">{$lang.can_not_edit}</label>
                     </div> 
              </div> 
       </div>   
       
        
        <div class="left space">
             <div class="span3 minbox ">
                    <div class="minbox_hd">{$lang.password}:
                      <input type="password" id="password" name="password"  />
                    </div>   
                     <div class="minbox_bd"><label class="field_notice">{$lang.numbers_letters}</label>
                    </div>
              </div>    
              
              
              <div class="span3 minbox">
                    <div class="minbox_hd_error"><a href="#" class="question"></a>{$lang.password_confirm}:
                    <input type="password" name="password_confirm" />
                    </div>
                    
                    <div class="minbox_bd orange"><label class="field_notice">{$lang.password_confirm_desc}</label>
                    </div>
              </div> 
             
     
        </div>   
           <div class="right"  id="register_right">
             <div class="right_bg">
               <input type="image" disabled="true" src="{res file=images}/finish_bf.gif" />
             </div>
         </div>
</form>   
  <!--span8 over--> 
   
    <div class="span4 ">
         
        </div> 
</div>
  <!--register over-->  
<div class="nav">
   <div class="login">注册
    </div>
 </div>
   <!--nav over-->
<div class="content">
11111
</div>
</div>
</body>
</html>
